import type { App } from 'vue';
import { createStore } from 'vuex'
import { config } from 'vuex-module-decorators'
config.rawError = true;

export function isDevMode(): boolean {
    return import.meta.env.DEV;
}
const isDev = isDevMode();

const store = createStore({
    strict: isDev,
})

export function setupStore(app: App<Element>) {
    app.use(store);
}

export default store;